<template>
	<view>
		<view class="recom" :style="{height: height+'rpx',}">
			<image :src="Img" id="qrcode"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				height: 0,
				Img: '',
			};
		},
		onLoad() {
			this.init();
		},
		methods:{
			init(){
				let self = this;
				uni.getSystemInfo({
					success(res) {
						console.log(res,self);
						let height = res.windowHeight;//可视高度
						self.height = height * 2;
					}
				})
				this.$util.util('MemberShop/QrCode',{PagePath: 'pages/user/user'},'GET').then(res=>{
					console.log(res);
					self.Img = res.FileUrl;
				}).catch(error=>console.log(error));
			},
		}
	}
</script>

<style lang="scss">
	// 背景图需要重新设计才可以更好的适应不同的屏幕
	.recom{
		width: 100%;
		// height: 1200upx;
		background: url('http://minipos.posyun3721.com/image/recommend-bj.png') no-repeat;
		background-size: 100% 100%;
		position: relative;
		#qrcode{
			position: absolute;
			z-index: 100;
			bottom: 150upx;
			left: 224upx;
			width: 302upx;
			height: 278upx;
			// border: 2upx solid #000;
		}
	}
</style>
